﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace EFContrib.PS4EF.Tst.SchoolTests
{
    public class SchoolEntitiesConnection : global::System.Data.Objects.ObjectContext
    {
        /// <summary>
        /// Initializes a new SchoolEntitiesConnection object using the connection string found in the 'SchoolEntitiesConnection' section of the application configuration file.
        /// </summary>
        public SchoolEntitiesConnection() :
            base("name=SchoolEntitiesConnection", "SchoolEntitiesConnection")
        {
        }
        /// <summary>
        /// Initialize a new SchoolEntitiesConnection object.
        /// </summary>
        public SchoolEntitiesConnection(string connectionString) :
            base(connectionString, "SchoolEntitiesConnection")
        {
        }
        /// <summary>
        /// Initialize a new SchoolEntitiesConnection object.
        /// </summary>
        public SchoolEntitiesConnection(global::System.Data.EntityClient.EntityConnection connection) :
            base(connection, "SchoolEntitiesConnection")
        {
        }
        /// <summary>
        /// There are no comments for Course in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public global::System.Data.Objects.ObjectQuery<Course> Course
        {
            get
            {
                if ((this._Course == null))
                {
                    this._Course = base.CreateQuery<Course>("[Course]");
                }
                return this._Course;
            }
        }
        private global::System.Data.Objects.ObjectQuery<Course> _Course;
        /// <summary>
        /// There are no comments for Department in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public global::System.Data.Objects.ObjectQuery<Department> Department
        {
            get
            {
                if ((this._Department == null))
                {
                    this._Department = base.CreateQuery<Department>("[Department]");
                }
                return this._Department;
            }
        }
        private global::System.Data.Objects.ObjectQuery<Department> _Department;
        /// <summary>
        /// There are no comments for Enrollment in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public global::System.Data.Objects.ObjectQuery<Enrollment> Enrollment
        {
            get
            {
                if ((this._Enrollment == null))
                {
                    this._Enrollment = base.CreateQuery<Enrollment>("[Enrollment]");
                }
                return this._Enrollment;
            }
        }
        private global::System.Data.Objects.ObjectQuery<Enrollment> _Enrollment;
        /// <summary>
        /// There are no comments for Person in the schema.
        /// </summary>
        [global::System.ComponentModel.BrowsableAttribute(false)]
        public global::System.Data.Objects.ObjectQuery<Person> Person
        {
            get
            {
                if ((this._Person == null))
                {
                    this._Person = base.CreateQuery<Person>("[Person]");
                }
                return this._Person;
            }
        }
        private global::System.Data.Objects.ObjectQuery<Person> _Person;
        /// <summary>
        /// There are no comments for Course in the schema.
        /// </summary>
        public void AddToCourse(Course course)
        {
            base.AddObject("Course", course);
        }
        /// <summary>
        /// There are no comments for Department in the schema.
        /// </summary>
        public void AddToDepartment(Department department)
        {
            base.AddObject("Department", department);
        }
        /// <summary>
        /// There are no comments for Enrollment in the schema.
        /// </summary>
        public void AddToEnrollment(Enrollment enrollment)
        {
            base.AddObject("Enrollment", enrollment);
        }
        /// <summary>
        /// There are no comments for Person in the schema.
        /// </summary>
        public void AddToPerson(Person person)
        {
            base.AddObject("Person", person);
        }
    }

}
